<?
//引入所有子系统信息
include_once("../../../common/model/extender_import.php");



//获取板块的设置
include_once("model/setting.php");

$data['member']=select_one_line_all_items($table_Prefix."member","nid = '".$_REQUEST ['nid']."'");
$data['unit'] = select_one_line_all_items($table_Prefix."unit","nid = '".$data['member']['unitnid']."'");
$quanxian = explode(",", $_SESSION['quanxian']);


//这里应该鉴权，看该用户信息，能否显示出来给当前session用户查看。
if($member_setting['visitmod']=="仅所属")
{
     if(
         ($data['member']['agentnid'] != $_SESSION['nid']) and
         ((!in_array("admin", $quanxian)))
        )
 {
   echo "仅所属 权限错误 并且记录到 操作日志";
   exit;
 }
}


if($member_setting['visitmod']=="所属及无所属"){

    //不是当前人所属，不是无所属，不是管理员，就出现错误提示。
    if (
        ( ($data['member']['agentnid'] != null) or  ($data['member']['agentnid'] != "") ) and
        ($data['member']['agentnid'] != $_SESSION['nid']) and
        (!in_array("admin", $quanxian))
       )
    {
        echo $data['member']['agentnid'];
        echo "所属及无所属 权限错误 并且记录到 操作日志";
        exit;
    }
}





//把用户的标签拆成数组，用于比较
$now_member_tag_array=explode(",",$data['member']['tag']);
//把用户的评级拆成数组，用于比较
$now_member_rank_array=explode(",",$data['member']['rank']);




//把设置种的标签拆成数组，用于循环比较
$tag_array = explode(";", $member_setting['tag']);

//拆成数组，用于循环比较
$rank_array = explode(";", $member_setting['rank']);

//拆成数组，用于循环
$contact_way_array = explode(";", $member_setting['contact_way']);




// //企业列表
// $unit_list = select_lines_all_items($table_Prefix . "unit", "nid desc", "", "0");

//当前所属列表
$unit      = select_one_line_all_items($table_Prefix . "unit", "nid = '" . $data['member']['unitnid'] . "'");





//员工 未做数据筛选。全部都显示
$employee_list = select_lines_all_items($table_Prefix . "employee", "nid desc", "", "0");
$employee_list_1d_array=transform_2darray_in_1darray_with_new_key($employee_list,"nid","name");

$now_employee= select_one_line_all_items($table_Prefix."employee","nid = '".$data['member']['agentnid']."'");


//获取对应的订单
$orderlist=select_lines_all_items($table_Prefix."order_list","nid desc","membernid='".$_REQUEST ['nid']."'","");


//获取该用户的联系记录
$contact_log=select_lines_all_items($table_Prefix."member_contact_log","nid desc","membernid='".$_REQUEST ['nid']."'","");


?>

